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AAAA,EAAgBkE,IAAAA,GAAhBlE,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,QAAAA,EAAAA,CAAsB,CAAC,YAAvBA,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,CAAkC,CAAC,wBAAwB,EAG5E,EAFI,IAGF,UAACsE,EAAcA,CAACC,OAAQb,IAATY,OACb,WAACvD,EAAMA,CACLG,GADKH,OACMG,EACXC,UAAW2C,EACX7C,MAAOA,EACPG,6BAA8BA,EAC9BC,4BAA6BA,EAC7BC,QAASA,EACTC,aAAcA,EACdE,eAAgBA,EAChBD,UAAWA,EACXE,aAAcA,YAEd,UAACM,IAAIA,UACH,CADGA,EACH,OAACf,QAAAA,UAAOjB,EAAMiB,KAAK,KAEpBmD,GACC,oBAACI,EAAAA,cAAcA,CAAAA,CACZ,GAAGJ,CAAyB,CAC7Bb,SAAUA,EACVkB,IAAKlB,EACLmB,SAAS,+BAGb,UAACC,UAAAA,CAAQxB,GAAG,wBACV,UAACqB,EAAAA,cAAcA,CAAAA,CAGbjB,SAAUA,EACVmB,SAAS,sBAET1E,MAAO+D,GADFR,KAIRc,GACC,oBAACG,EAAAA,cAAcA,CAAAA,CACZ,GAAGH,CAAyB,CAC7BI,IAAKlB,EACLA,SAAUA,EACVmB,SAAS,mCAMrB","sources":["webpack://_N_E/?7002","webpack://_N_E/./pages/[[...page]].tsx","webpack://_N_E/../../node_modules/@apollo/client/react/context/ApolloProvider.js","webpack://_N_E/../../libs/shared/mi-headless-utils/src/components/Layout/index.tsx","webpack://_N_E/../../libs/shared/mi-headless-utils/src/components/PageRendererComponent/index.tsx"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/[[...page]]\",\n function () {\n return require(\"private-next-pages/[[...page]].tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/[[...page]]\"])\n });\n }\n ","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { GetServerSideProps } from 'next';\n\nimport { PageRendererComponent, prePageCall } from '@marriott/mi-headless-utils';\nimport { PARAM_PAGENO, processDynamicProps, updateDataLayer } from '@marriott/mi-offers-components';\nimport { mockOffersApiResponse } from '../mock/mockOffersApiResponse';\nimport { fetchOffersSpecificData } from '@marriott/mi-offers-components';\nimport { isLocalDev } from '@marriott/mi-apollo-client-utils';\nimport OfferSignatures from '../signatures/offerSignatures.json';\nimport { NEXT_PUBLIC_ENV_KEYS } from '@marriott/mi-offers-components';\n\nconst { LOCAL_UXL_CONTENT_URI } = process.env;\n\nfunction pageRenderer(props) {\n if (isLocalDev) {\n console.log('[page] props - ', props);\n }\n\n if (!props.isSeoDisable && Object.keys(props?.productSpecificResponse)?.length) {\n processDynamicProps(props);\n }\n\n console.log('canonical url', props.model['canonical']);\n const url =\n props.model && props.model['canonical'] !== undefined && props.model['canonical'] !== ''\n ? new URL(props.model['canonical'], props.model['canonical'])\n : ''; // Base URL needed to parse relative URL\n const param = PARAM_PAGENO;\n if (url !== '' && url.searchParams.has(param)) {\n if (props.pageNo === '1') {\n url.searchParams.delete(param);\n } else {\n url.searchParams.set(param, props.pageNo); // Update the parameter value\n }\n } else {\n if (url !== '' && props.pageNo != null && props.pageNo !== '1') {\n url.searchParams.append(param, props.pageNo); // Add it if it doesn't exist\n }\n }\n const baseUrl = url.toString();\n props.model['canonical'] = baseUrl;\n return <PageRendererComponent {...props} />;\n}\n\n//Any product specific page data apart from common data like session, datalayer\n//can be returned from this function and the same is passed as props to the page Component\nconst offersSpecificData = async (context: any, parallelCallsResponse: any, interceptorResponse: any) => {\n const req = context?.req;\n\n console.log('[page] offers context -', context, 'context resolvedUrl -', context?.resolvedUrl, 'req -', req);\n console.log('[page] parallelCallsResponse ', parallelCallsResponse);\n console.log('[page] interceptorResponse ', interceptorResponse);\n\n const resolvedUrlString: string = req?.url;\n const isAuthorMode = resolvedUrlString.includes('isAuthorMode');\n const currentLocale = interceptorResponse?.requestAttributes?.pageManagerRequest?.global?.localeKey?.replace(\n '_',\n '-'\n );\n\n let pageSpecificDatalayer = {};\n\n //get pageno param for renderer\n let pageNo = null;\n if (isAuthorMode == false) {\n const url = new URL(req.url, `http://${req.headers.host}`); // Use the full URL\n //capturing query param pageNO from req url\n pageNo = url.searchParams.get(PARAM_PAGENO);\n }\n const offersSpecificData = isAuthorMode\n ? mockOffersApiResponse\n : await fetchOffersSpecificData(context, currentLocale);\n console.log('service api response::', offersSpecificData);\n let uri = offersSpecificData?.response?.uri;\n if (uri && isLocalDev && !isAuthorMode) {\n const resolvedOfferType = uri.split('offers-').pop().split('/')[0];\n uri = `${LOCAL_UXL_CONTENT_URI}${resolvedOfferType}`;\n } else if (typeof uri == 'undefined') {\n uri = null;\n }\n\n if (!isAuthorMode && offersSpecificData && Object.keys(offersSpecificData?.response)?.length) {\n pageSpecificDatalayer = updateDataLayer(offersSpecificData?.response);\n }\n\n return {\n operationSignatures: OfferSignatures,\n productSpecificResponse: offersSpecificData?.response,\n uri: uri,\n isSeoDisable: isAuthorMode,\n nextPublicEnvKeys: NEXT_PUBLIC_ENV_KEYS,\n pageNo: pageNo,\n serverDataLayer: pageSpecificDatalayer,\n };\n};\n\n//Make pre page calls like session, datalayer, fetch model.json, producSpecifc data etc\n//at server side and pass the data is passed as props to page component.\nexport const getServerSideProps: GetServerSideProps<any> = prePageCall(offersSpecificData);\nexport default pageRenderer;\n","import { __assign } from \"tslib\";\nimport { invariant } from \"../../utilities/globals/index.js\";\nimport * as React from \"rehackt\";\nimport { getApolloContext } from \"./ApolloContext.js\";\nexport var ApolloProvider = function (_a) {\n var client = _a.client, children = _a.children;\n var ApolloContext = getApolloContext();\n var parentContext = React.useContext(ApolloContext);\n var context = React.useMemo(function () {\n return __assign(__assign({}, parentContext), { client: client || parentContext.client });\n }, [parentContext, client]);\n invariant(context.client, 47);\n return (React.createElement(ApolloContext.Provider, { value: context }, children));\n};\n//# sourceMappingURL=ApolloProvider.js.map","import Head from 'next/head';\nimport React, { ReactElement, useMemo } from 'react';\n\nexport const siteTitle = 'Marriott';\n\nexport function Layout({\n children,\n title,\n metaNames,\n metaProps,\n staticComponentClientLibsCSS,\n staticComponentClientLibsJS,\n gridCss,\n isAuthorMode,\n canonical = '',\n USE_MOCK_MODEL = false,\n hreflangList = [],\n mainID = '',\n}: {\n children?: ReactElement | Array<ReactElement>;\n title?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metaNames: Array<any>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metaProps?: Array<any>;\n staticComponentClientLibsCSS?: string;\n staticComponentClientLibsJS?: string;\n gridCss?: string;\n isAuthorMode?: boolean;\n canonical?: string;\n USE_MOCK_MODEL?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hreflangList?: Array<any>;\n mainID?: string;\n}) {\n const generateClientLibsHost = useMemo(() => {\n if (String(process.env['IS_LOCAL_DEV']) === 'true' && !isAuthorMode && !USE_MOCK_MODEL) {\n return process.env['NEXT_PUBLIC_AEM_HOST'];\n } else {\n return '';\n }\n }, []);\n\n return (\n <>\n <Head>\n <meta charSet=\"UTF-8\" />\n <link rel=\"icon\" href=\"/favicon.ico\" />\n <title>{title}</title>\n {metaNames?.map(metaName => (\n <meta key={metaName.name} name={metaName.name} content={metaName.value}></meta>\n ))}\n {metaProps?.map(metaProperty => (\n <meta key={metaProperty.name} property={metaProperty.name} content={metaProperty.value}></meta>\n ))}\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n {canonical && <link rel=\"canonical\" href={canonical} />}\n <link rel=\"preload\" href={`${generateClientLibsHost}${staticComponentClientLibsCSS}`} as=\"style\" />\n <link rel=\"stylesheet\" href={`${generateClientLibsHost}${staticComponentClientLibsCSS}`} />\n <link rel=\"stylesheet\" href={`${generateClientLibsHost}${gridCss}`} />\n {hreflangList?.map((item, index) => (\n <link rel=\"alternate\" href={item?.href} hrefLang={item?.hreflang} key={`href-lang-list-${index}`} />\n ))}\n </Head>\n <main id={mainID}>{children}</main>\n {staticComponentClientLibsJS && (\n <script src={`${generateClientLibsHost}${staticComponentClientLibsJS}`} defer></script>\n )}\n </>\n );\n}\n","//This returns a component which can be rendered in any product specific [[page.tsx]]\n//to return the page template(Head, main, sections) along with the required react Components mentioned in model.json and\n// load the CSS and JS libs required by static components from AEM.\nimport { ResponsiveGrid } from '@adobe/aem-react-editable-components';\nimport { ApolloProvider } from '@apollo/client';\nimport Head from 'next/head';\nimport { ApolloEnvVars, getDeployedEnvType, useNextMiApolloClient } from '@marriott/mi-apollo-client-utils';\nimport { Layout } from '../Layout';\nimport { respGridUtil } from '../../lib/helpers';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport function PageRendererComponent({\n model,\n pagePath,\n operationSignatures,\n isAuthorMode,\n USE_MOCK_MODEL,\n apolloEnvVars,\n}: {\n model?: any;\n pagePath?: string;\n operationSignatures?: Array<any>;\n isAuthorMode?: boolean;\n USE_MOCK_MODEL?: boolean;\n apolloEnvVars?: ApolloEnvVars;\n}) {\n const MiApolloClient = useNextMiApolloClient(\n operationSignatures || [],\n apolloEnvVars?.DEPLOYED_ENV_TYPE || getDeployedEnvType(),\n {},\n {},\n apolloEnvVars\n );\n\n const {\n metaNames,\n metaProperties,\n title,\n staticComponentClientLibsCSS,\n staticComponentClientLibsJS,\n gridCss,\n canonical,\n hreflangList,\n }: {\n metaNames: Array<any>;\n metaProperties: Array<any>;\n title: string;\n staticComponentClientLibsCSS: string;\n staticComponentClientLibsJS: string;\n gridCss: string;\n canonical: string;\n hreflangList: Array<any>;\n } = model;\n const respGridModel = respGridUtil(model?.cqItems?.root?.[':items']?.responsivegrid);\n const responsiveGridHeaderModel = model?.cqItems?.root?.[':items']?.['header-responsivegrid']\n ? respGridUtil(model?.cqItems?.root?.[':items']?.['header-responsivegrid'])\n : false;\n const responsiveGridFooterModel = model?.cqItems?.root?.[':items']?.['footer-responsivegrid']\n ? respGridUtil(model?.cqItems?.root?.[':items']?.['footer-responsivegrid'])\n : false;\n\n return (\n <ApolloProvider client={MiApolloClient}>\n <Layout\n metaNames={metaNames}\n metaProps={metaProperties}\n title={title}\n staticComponentClientLibsCSS={staticComponentClientLibsCSS}\n staticComponentClientLibsJS={staticComponentClientLibsJS}\n gridCss={gridCss}\n isAuthorMode={isAuthorMode}\n USE_MOCK_MODEL={USE_MOCK_MODEL}\n canonical={canonical}\n hreflangList={hreflangList}\n >\n <Head>\n <title>{model.title}</title>\n </Head>\n {responsiveGridHeaderModel && (\n <ResponsiveGrid\n {...responsiveGridHeaderModel}\n pagePath={pagePath}\n key={pagePath}\n itemPath=\"root/header-responsivegrid\"\n />\n )}\n <section id=\"main-content\">\n <ResponsiveGrid\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n pagePath={pagePath}\n itemPath=\"root/responsivegrid\"\n key={pagePath}\n model={respGridModel}\n />\n </section>\n {responsiveGridFooterModel && (\n <ResponsiveGrid\n {...responsiveGridFooterModel}\n key={pagePath}\n pagePath={pagePath}\n itemPath=\"root/footer-responsivegrid\"\n />\n )}\n </Layout>\n </ApolloProvider>\n );\n}\n"],"names":["pageRenderer","Object","isLocalDev","console","log","props","isSeoDisable","keys","productSpecificResponse","length","processDynamicProps","model","url","undefined","URL","param","PARAM_PAGENO","searchParams","has","pageNo","delete","set","append","baseUrl","toString","PageRendererComponent","Layout","children","title","metaNames","metaProps","staticComponentClientLibsCSS","staticComponentClientLibsJS","gridCss","isAuthorMode","canonical","USE_MOCK_MODEL","hreflangList","mainID","generateClientLibsHost","useMemo","String","process","Head","meta","charSet","link","rel","href","map","metaName","name","content","value","metaProperty","property","as","item","index","hrefLang","hreflang","main","id","script","src","defer","pagePath","operationSignatures","apolloEnvVars","MiApolloClient","useNextMiApolloClient","DEPLOYED_ENV_TYPE","getDeployedEnvType","metaProperties","respGridModel","respGridUtil","cqItems","root","responsivegrid","responsiveGridHeaderModel","responsiveGridFooterModel","ApolloProvider","client","ResponsiveGrid","key","itemPath","section"],"sourceRoot":"","ignoreList":[2]}